package com.example.timer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author Administrator
 */
@Slf4j
@Service
public class oracleJob {

    /**
     * 定时器 俩秒执行一次
     */
    @Scheduled(cron = "0/2 * * * * ?")
    public void dataBackup() {
        System.out.println("定时器开始zhong~~~~"+ new Date());
    }
}
